package com.sd.repay.sms;

import com.sd.repay.pojo.SmsConfig;
import com.sd.repay.pojo.SmsInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public abstract class BaseSmsService {

    /**
     * 编码格式
     */
    public static final String enCode = "UTF-8";

    /**
     * 超时时间
     */
    public static final int timeOut = 40000;

    @Resource
    public SmsDb smsDb;

    /**
     * @return
     */
    public abstract String getChannel();

    /**
     * 发送短信
     *
     * @param smsInfo 发送短信信息
     * @param config  渠道配置信息
     */
    public abstract void smsSend(SmsInfo smsInfo, SmsConfig config);

}
